<style lang="less" scoped>
	@border-color:#E3E8EA;//边框颜色
	@font-color:#686E71;//正常字体颜色
	@primary-color:#FE9333;//橘黄色默认颜色
	@write-color:#fff;
	*{
        word-wrap:break-word;
    }
	.content{
		margin-top: 60px;
		width: 100%;
		min-width: 1000px;
		height: 1020px;
		background: url('../../images/release_bg.png') no-repeat center;
		.contentDiv{
			width: 963px;
			height: 850px;
			margin: 0 auto;
			.phone{
				width: 345px;
				height: 770px;
				position: relative;
				float: left;
				.phoneDiv{
					position: absolute;
					left: -44px;
					top:-2px;
					background:url('../../images/release_phonecopy.png') no-repeat;
					background-size: 100% 100%;
					width:432px;
					height:780px;
					-webkit-transform: scale(0.8);
					-moz-transform: scale(0.8);
					-ms-transform: scale(0.8);
					-o-transform: scale(0.8);
					transform: scale(0.8);
					.phoneDivCon{
						width: 397px;
						height: 608px;
						position: absolute;
						top: 121px;
						left: 26.5px;
						color: #fff;
						overflow-y:auto;
						overflow-x:hidden;
					}
					
				}
				.popup{
					position: absolute;
					top:292px;
					left: 100px;
					background: #FFFFFF;
					box-shadow: 0 0 4px 0 rgba(0,0,0,0.23);
					border-radius: 4px;
					width: 154px;
					height: 40px;
					font-size: 14px;
					color: #686E71;
					line-height: 44px;
					img{
						width: 30px;
						height: 24px;
						vertical-align: sub;
						margin:  0 10px 0 16px;
					}
				}
				.btn{
					position: absolute;
					left: 40px;
					bottom: 0;
					width: 220px;
					height: 40px;
					line-height: 40px;
					color: #fff;
					background: url('../../images/release_edit.png') no-repeat;
					background-size: 100% 100%;
					font-size: 14p;
					text-align: center;
					box-shadow: 2px 2px 6px 0 rgba(192,120,126,0.44);
					border-radius: 4px;
					cursor: pointer;
				}
				.set{
					position: absolute;
					left: 270px;
					bottom: 0;
					width: 40px;
					height: 40px;
					background: url('../../images/release_set.png') no-repeat;
					background-size: 100% 100%;
					box-shadow: 2px 2px 6px 0 rgba(192,120,126,0.44);
					border-radius: 4px;
					cursor: pointer;
				}
			}
			.right{
				width: 460px;
				height: 678px;
				float: left;
				margin-left: 158px;
				margin-top: 60px;
				.title{
					overflow: hidden;
					div{
						width: 230px;
						height: 40px;
						line-height: 40px;
						border-radius: 8px 8px 0 0;
						background: #E3E8EA;
						border: 1px solid #E3E8EA;
						float: left;
						font-size: 16px;
						text-align: center;
						cursor: pointer;
						font-weight: bold;
					}
					.on{
						background-color: @primary-color;
						border: 0;
						color: #fff;
					}
				}
				.shareSet{
					width: 460px;
					height: 140px;
					padding: 20px 30px;
					background-color: #fff;
					.img{
						width: 100px;
						height: 100px;
						float: left;
						display: flex;
						justify-content: center;
						align-items: center;
						position: relative;
						img{
							max-width: 100%;
							max-height: 100%;
						}
						div{
							position: absolute;
							top:0;
							left:0;
							width: 100px;
							height: 100px;
							display: none;
							background-color: rgba(0,0,0,0.8);
							line-height: 100px;
							text-align: center;
							cursor: pointer;
							color:#fff;
						}
					}
					.img:hover{
						div{
							display: block;
						}
					}
					p{
						margin-top: 5px;
						float: right;
					}
					.p1{
						width: 280px;
						height: 22px;
						line-height: 22px;		
						font-size: 16px;	
						font-weight: bold;			
						white-space:nowrap;
						text-overflow:ellipsis;
						overflow:hidden;
					}
					.p2{
						width: 280px;
						height: 60px;
						line-height: 20px;
						overflow: hidden;
					}
				}
				.shareMore{
					width: 460px;
					height: 350px;
					background-color: #fff;
					box-shadow: 0 5px 30px 0px rgba(35,194,83,0.21) inset;		
					background-color: #F6FAF9;
					border: 1px solid #E3E8EA;	
					padding: 25px 30px 20px 30px;
					.p1{
						height: 22px;
						line-height: 22px;
						font-size: 16px;
						color: #23C253;
						text-align: center;
						span:nth-child(1){
							display: inline-block;
							width: 24px;
							height: 1px;
							background-color: #23C253;
							vertical-align: middle;
						}
						span:nth-child(2){
							display: inline-block;
							width: 186px;
							text-align: center;
							margin: 0 5px;
						}
						span:nth-child(3){
							display: inline-block;
							width: 24px;
							height: 1px;
							background-color: #23C253;
							vertical-align: middle;
						}
					}	
					.ewmImg{
						width: 170px;
						height: 170px;
						box-shadow: 2px 4px 20px 6px rgba(35,194,83,0.27); 
						border: 1px solid #F5F5F5;
						margin-left: 115px;
						margin-top: 15px;
						img{
							width: 100%;
							height: 100%;
						}
					}	
					.url{
						height: 30px;
						line-height: 30px;
						margin-top: 30px;
						margin-bottom: 10px;
						span{
							font-size: 14px;
							color: #686E71;
							font-weight: bold;
							margin-right: 20px;
						}
						div{
							height: 30px;
							width: 240px;
							display: inline-block;
							background: #FFFFFF;
							// border: 1px solid #CDD3D6;
							// border-radius: 4px;
							//     vertical-align: bottom;
						}
						Button{
							width: 74px;
							height: 30px;
							margin-left: 1px;
						}
					}
					.other{
						height: 30px;
						line-height: 30px;
						span{
							font-size: 14px;
							color: #686E71;
							font-weight: bold;
							margin-right: 20px;
						}
						ul{
							display: inline-block;
							vertical-align: middle;
							li{
								float: left;
								width: 26px;
								height: 26px;
								border-radius: 50%;
								margin-right: 10px;
								cursor: pointer;
								img{
									width: 100%;
									height: 100%;
								}
							}
						}
					}
				}
				.fkinfo{
					width: 460px;
					height: 150px;
					background-color: #fff;
					padding: 10px 30px 20px;
					.p1{
						line-height: 22px;
						font-weight: bold;
						font-size: 14px;
						span{
							float: right;
							font-weight: normal;
							font-size: 12px;
							i{
								color: @primary-color;
								margin-left: 5px;
								font-style: normal;
							}
						}
					}
					ul{
						width: 420px;
						height: 85px;
						margin-top: 10px;
						overflow: hidden;
						li{
							float: left;
							width: 40px;
							text-align: center;
							margin-right: 19px;
							img{
								width: 40px;
								height: 40px;
								border-radius: 50%;
								margin-bottom: 10px;
							}
							p{
								line-height: 17px;
								font-size: 12px;
								color: #686E71;				
								white-space:nowrap;
								text-overflow:ellipsis;
								overflow:hidden;				
							}
							.time{
								color: #B5BDC2;
							}
						}
					}
					.notData{
						margin: 14px 0 0 125px;
					}
				}
				.comment{
					width: 460px;
					height: 500px;
					background: #F6FAF9;
					border: 1px solid #E3E8EA;	
					box-shadow: 0 5px 30px 0px rgba(35,194,83,0.21) inset;		
					.data{
						height: 430px;
						padding: 20px 0px 10px 30px;
						border-bottom: 1px solid #E3E8EA;
						overflow: auto;
						.title{
							font-size: 12px;
							color: #808587;
							line-height: 18px;
							margin-bottom: 10px;
							span{
								color:@primary-color;
							}
						}
						.ly{
							margin-bottom: 15px;
							.headimg{
								display: inline-block;
								vertical-align: top;
								width: 40px;
								height: 40px;
								margin-right: 5px;
							}
							.info{
								display: inline-block;
								vertical-align: top;
								width: 350px;
								.name{
									font-size: 12px;
									.sp1{
										font-size: 14px;
										font-weight: bold;
										line-height: 22px;
										color: #686E71;
									}
									.sp2{
										float: right;
										color: #FE9333;
										cursor: pointer;
									}
									.sp3{
										float: right;
										margin-right: 20px;
										color: #FE9333;		
										cursor: pointer;								
									}
								}
								.time{
									margin: 1px 0 5px;
									color: #B5BDC2;
								}
								.p{
									line-height: 18px;
									text-align: justify;
									margin-bottom: 5px;
								}
								.hfp{
									line-height: 18px;
									text-align: justify;
									margin-bottom: 5px;
									span{
										color:#4CB2EB;
										font-weight: bold;
										cursor: pointer;
									}
									.del{
										float: right;
										color: #FE9333;
										display: none;
									}
								}
								.hfp:hover{
									.del{
										display: inline-block;
									}
								}
							}
						}
						.notData{
							padding-top: 100px;
							padding-left: 100px;
							img{
								width: 200px;
								height: 100px;
							}
						}
					}
					.input{
						width: 460px;
						height: 70px;
						.commentInput{							
							width: 340px;
							height: 40px;
							margin: 10px 10px 0 30px;
							display: inline-block;
						}
						.sendBtn{
							display: inline-block;
							width: 50px;
							height: 36px;
							line-height: 36px;
							background-image: linear-gradient(-145deg, #FFAC12 0%, #FD5286 100%);
							border-radius: 4px;
							font-size: 14px;
							color: #FFFFFF;
							text-align: center;
							vertical-align: middle;
							cursor: pointer;
						}
					}
				}
			}
			.photoboxLeft{
				position:absolute;
				left: -42px;
    			top: 213px;
				width: 40px;
				div{
					width: 5px;
    				padding: 18px 26px 22px 14px;
					background: #F6FAF9;
					color:#686E71;
					cursor: pointer;
				}
				div.on{
					color: #fff;
					background: #F16473;
				}
			}
		}
	}
	.otherModal{
        ul{
            overflow: hidden;
            li{
                float: left;
            }
        }
        .left{
            width: 240px;
            height: 479px;
            float: left;
            background: url('../../images/element_leftside_bg2.png') no-repeat;
            background-size: 100% 100%;
            .img{
                width: 100px;
                height: 100px;
                padding: 8px;
                background-color: #fff;
                margin: 30px 70px 11px 70px;
                box-shadow: 6px 6px 8px 0 rgba(103,109,112,0.20);
				display:flex;
				justify-content: center;
    			align-items: center;
                img{
                    max-width: 100%;
                    max-height: 100%;
                }
            }
            .btn{
                width: 80px;
                height: 30px;
                line-height: 30px;
                font-size: 14px;
                background-color: #4CB2EB;
                color: @write-color;
                margin: 0 auto;
                text-align: center;
                border-radius: 4px;
                cursor: pointer;
            }
            .txt{
                margin-top: 16px;
                padding: 0 13px 0 15px;
                p{
                    font-size: 14px;
                    color: #686E71;
                    font-weight: bold;
                    margin-bottom: 6px;
                    span{
                        font-size: 12px;
                        font-weight: normal;
                        padding-left: 2px;
                    }
                }
                .p2{
                    margin-top: 13px;
                }
            }

        }
        .right{
            width: 560px;
            height: 480px;           
            float: left;
            .top{
                height: 413px;
                border-top: 1px solid #B5BDC2;
                border-bottom: 1px solid #E3E8EA;
                padding: 11px 20px 6px 20px;
                div{
                    border-bottom: 1px solid #E3E8EA;
                    overflow: hidden;
                    padding-top: 23px;
                    span{
                        display: block;
                        float: left;
                        font-size: 14px;
                        color:#686E71;
                        font-weight: bold;
                        margin-right: 20px;
                    }
                    ul{
                        li{
                            margin-bottom: 6px;
                            width: 78px;
                            font-size: 14px;
                            line-height: 16px;
                            height: 16px;
                            color: #686E71;
                            input{
                                width: 16px;
                                height: 16px;
                                vertical-align: middle;
                                margin-right: 8px;
                            }
                        }
                    }
                }
                .age{
                   
                   li{
                       width: 118px;
                   }
                }
            }
            .top1{
                width: 100%;
                height: 413px;
                background:url('../../images/element_setweichat.png') no-repeat;
                background-size: 100% 100%;
                position: relative;
                .content1{
                    position: absolute;
                    width: 191px;
                    height: 111px;
                    top:141px;
                    left: 173px;
                    padding: 8px 12.8px 12px 12.8px;
                    font-size: 0;
                    .p1{
                        font-size: 14px;
                        color: #000000;
                        letter-spacing: 0;
                        line-height: 17px;
                        height: 34px;
                        overflow:hidden;
                        margin-bottom: 4px;
                    }
                    .img{
                        display: inline-block;
                        width: 53px;
                        height: 53px;
                        vertical-align: top;
                        margin-right: 6px;
                    }
                    .p2{
                        display: inline-block;
                        font-size: 12px;
                        color: #707070;
                        letter-spacing: 0;
                        line-height: 17px;
                        width: 106px;
                        height: 51px;
                        overflow:hidden;
                    }
                }
            }
            .bottom{
                padding-left: 30px;
                height: 70px;
                line-height: 70px;
                span{
                    color: @primary-color;
                }
            }
        }
    }
</style>
<style lang="less">
	@border-color:#E3E8EA;//边框颜色
	@font-color:#686E71;//正常字体颜色
	@primary-color:#FE9333;//橘黄色默认颜色
	.url{
		.ivu-input{
			height: 30px;
			width: 240px;
			cursor: pointer;
			background-color: #fff;
		}
	}
	.commentInput{
		.ivu-input{
			height: 40px;
			width: 340px;
		}
	}
	//照片集
        .photoClow1{//一行2个
            padding: 15px 1px 11px 25px;
            .div{
                // width: 152px;
                height: 243px;
                margin-bottom:25px; 
                margin-right: 24px;
                overflow: hidden;
                display: flex;
                justify-content: center;
                align-items: center;
                img{
                    height: 100%;
                }
            }              
        }
        .photoClow2{//一行3个
            padding: 15px 13px 15px 25px;
            .div{
                width: 101px;
                height: 162px;
                margin-bottom:15px; 
                margin-right: 12px;
                overflow: hidden;
                display: flex;
                justify-content: center;
                align-items: center;
                img{
                    height: 100%;
                }
            }              
        }
        //视频
        .videoClow1{//一行2个
            .div{
                font-size: 13px;
                width: 185px;
                div{
                    width: 185px;
                    height: 116px;
                    margin-bottom: 8px;
                     display: flex;
                    justify-content: center;
                    align-items: center;
                    img{
                        height: 100%;
                    }
                }
                p{
                    line-height: 16px;
                    padding: 0 7px;
                }
                margin-bottom: 10px;
            }
            .div:nth-child(odd){
                margin-right: 7px;
            }
        }
        .videoClow2{//一行2个
            .div{
                font-size: 13px;
                div{
                    width: 122px;
                    height: 77px;
                    margin-bottom: 8px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    img{
                        height: 100%;
                    }
                }
                p{
                    line-height: 16px;
                    padding: 0 7px;
                }
                margin-bottom: 20px;
            }
            .div:nth-child(3n+1){
                margin: 0 6px;
            }
        }
		.otherModal{
        .ivu-modal-body{
            padding: 0;
            overflow: hidden;
        }
        .ivu-modal-footer{
            display: none;
        }
        .ivu-input{
            height: 30px;
        }
        textarea.ivu-input{
            resize: none;
            background: rgba(255,255,255,0.7);
            border: 0;
            font-size: 14px;
            color: #686E71;
        }
        .textarea1{
            textarea.ivu-input{
                 height: 68px;                
            }
        }
        .textarea2{
            textarea.ivu-input{
                height: 134px;
            }
        }

        .bottom{
			.cancel{
				font-size: 14px;		
                margin-left: 74px;
                margin-right: 32px;		
			}
			.ok{
				padding: 8px 43px;
				font-size: 16px;
			}
            .ivu-radio-wrapper{
                margin-right: 30px;
            }
		}
    }
</style>
<template>
	<div>
		<v-header :loginBack="loginBackFn"></v-header> 
		<!---->
		<div class="content">
			<div class="contentDiv">
				<!--左侧手机展示-->
				<div class="phone">
					<div class="phoneDiv">					
						<div class="phoneDivCon" @wheel="scrollBarWheel" v-if="phoneShow">
							<div v-for="(item,index) in headerstyle">
								<div :style="item.headerStyle" v-if="item.type==1">
									<!--头像-->
									<div :style="item.moduleImageDivStyle"><img :src="imgurl+item.cemeteryIntroduction.headPictureSource" style="width: 100%;height: 100%;"/></div>
									<!--姓名-->
									<div :style="item.nameStyle" ref="nameStyle">{{item.cemeteryIntroduction.userName}}</div>
									<!--出生日期-->
									<div :style="item.introductionDayStyle" ref="introductionStyle">{{birthdayTime(item.cemeteryIntroduction.birthDay)+birthDayAnd+birthdayTime(item.cemeteryIntroduction.deadDay)}}</div>
									<!--个人简介-->
									<div :style="item.introductionStyle" ref="introductionDayStyle">{{item.cemeteryIntroduction.introduction}}</div>			
									<v-edittext :textflag="item.templateModuleContent"></v-edittext>
									<img  :src="imgurl+item1.picSourcePath" v-for="(item1,index) in item.templateModulePicDTO" ref="picstyle" :style="item1.picStyle">
									<img  :src="imgurl+item1.videoPicSourcePath" v-for="(item1,index) in item.templateModuleVideoDTO" ref="spstyle" :style="item1.videoStyle">
								</div>
								<!--墓志铭-->
								<div :style="item.headerStyle" v-if="item.type==2">
									<!--标题-->
									<div  :style="item.nameStyle"  ref="nameStyle" >{{item.moduleTitle}}</div>
									<!--内容-->
									<div  :style="item.epitaphStyle"  ref="epitaphStyle">{{item.cemeteryEpitaph.content}}</div>
									<!--图片素材-->
									<v-edittext :textflag="item.templateModuleContent"></v-edittext>
									<img  :src="imgurl+item1.picSourcePath" v-for="(item1,index) in item.templateModulePicDTO" ref="picstyle" :style="item1.picStyle">
									<img  :src="imgurl+item1.videoPicSourcePath" v-for="(item1,index) in item.templateModuleVideoDTO" ref="spstyle" :style="item1.videoStyle">
								</div>
								<!--照片-->
								<div :style="item.headerStyle" v-if="item.type==3">
									<!--标题-->
									<div :style="item.nameStyle">
										<!--图标-->
										<img :src="imgurl+item.moduleIcon" :style="item.moduleIconStyle"/>
										<!--标题-->
										<div :style="item.moduleTitleStyle" >{{item.moduleTitle}}</div>
									</div>
									<!--内容-->
									<div :style="item.moduleSwiperStyle" class="photoDivCon">
										<div >					
											<swiper :options="swiperOption" ref="mySwiper">
												<!-- 幻灯内容 -->
												<swiper-slide v-for="(item,index) in (item.photos) " @click="deldom($event,imagearr,index)">
													<div  class="imgshow"><img :src="imgurl+item.albumPath" :style="item.imageStyle" /></div>								
												</swiper-slide>
											</swiper>
										</div>
									</div>
								</div>
								<!--人生旅途-->
								<div :style="item.headerStyle" v-if="item.type==4">
										<!--标题-->
									<div :style="item.nameStyle">
										<!--图标-->
										<img :src="imgurl+item.moduleIcon" :style="item.moduleIconStyle"/>
										<!--标题-->
										<div :style="item.moduleTitleStyle">{{item.moduleTitle}}</div>
									</div>
									<!--内容-->
									<div>
										<!--时间轴-->
										<div :style="item.moduleSwiperStyle">
											<swiper :options="rsOption">
												<!-- 幻灯内容 -->
												<swiper-slide v-for="(items,index) in (item.lifes)">
													<div :style="item.moduleSwiperDivStyle">
														<p :style="item.moduleSwiperPStyle" class="tripConTime">{{items.startTime.substring(0,4)+'-'+items.endTime.substring(0,4)}}</p>
														<div :style="item.moduleSwiperDiv2Style"></div>
														<div v-if="iconcheckflag==index" class="tripConDot tripConDot1"  @click.stop="rsltcheckFn(index)" :style="item.moduleSwiperIconStyle"><img :src="imgurl+item.moduleSwiperIcon0Path" /></div>
														<div v-else class="tripConDot tripConDot2"  @click.stop="rsltcheckFn(index)" :style="item.moduleSwiperIconStyle"><img :src="imgurl+item.moduleSwiperIcon1Path" /></div>
													</div>
												</swiper-slide>
											</swiper>
										</div>
										<!--内容-->
										<!--内容-->
										<div :style="item.moduleContentStyle">{{Singlere.eventContent}}</div>
										<!--图片-->
										<div :style="item.moduleImageDivStyle" class="displayflex overflow" >
											<img :src="Singlere.eventPicCutBig ? imgurl+Singlere.eventPicCutBig :staticimg+'/images/blank4.png'" :style="Singlere.imageStyle"/>
										</div>
									</div>
								</div>	
								<!--作品集-->
								<div :style="item.headerStyle" v-if="item.type==6">
									<!--标题-->
									<div :style="item.nameStyle">
										<!--图标-->
										<img :src="imgurl+item.moduleIcon" :style="item.moduleIconStyle"/>
										<!--标题-->
										<div :style="item.moduleTitleStyle">{{item.moduleTitle}}</div>
									</div>
									<!--内容-->
									<div :style="item.moduleSwiperPStyle" class="workCon">
										<swiper :options="zpOption">
											<!-- 幻灯内容 -->
											<swiper-slide v-for="(items,index) in (item.works)">
												<div :style="item.moduleSwiperDivStyle" >
													<div :style="item.moduleImageDivStyle"><img :src="imgurl+items.pictureCoverPath" :style="items.imageStyle"/></div>
													<p :style="item.moduleSwiperPStyle" class="workDivChange">
														{{items.worksName}}
													</p>
												</div>
											</swiper-slide>
										</swiper>
									</div>
								</div>	
								<!--视频-->
								<div :style="item.headerStyle" v-if="item.type==5">
									<!--标题-->
									<div :style="item.nameStyle">
										<!--图标-->
										<img :src="imgurl+item.moduleIcon" :style="item.moduleIconStyle"/>
										<!--标题-->
										<div :style="item.moduleTitleStyle">{{item.moduleTitle}}</div>
									</div>
									<!--内容-->
									<div :style="item.moduleSwiperStyle" >
										<swiper :options="spOption">
											<!-- 幻灯内容 -->
											<swiper-slide v-for="(items,index) in (item.videos)"  class="videoCon">												
													<div :style="item.moduleImageDivStyle" class="videoConImg">
														<img :src="items.videoPicPath ?  (items.videoCoverStatus == 1 ? videoImg + items.videoPicPath : imgurl + items.videoPicPath)  : staticimg+'/images/blank3.png'" :style="item.moduleImageStyle"/>
														<div class="icon"></div>
													</div>
													<video :src="global+items.videoPath" v-show="false"></video>
													<p :style="item.moduleSwiperPStyle" class="videoConTitle">
														{{items.videoName}}
													</p>                                       												
											</swiper-slide>
										</swiper>
									</div>
								</div>					
							</div>
						</div>
						
					</div>
					<!-- 滚动提示 -->
					<div class="popup" v-show="popupFlg" @click="popupFlg=false"><img src="../../images/screenmouse@2x.png" />鼠标滚动浏览</div>
					<!--单双墓穴切换-->
					<div class="photoboxLeft">
						<div :class='{on:index==dscheckactive}' v-for="(item,index) in doubleCemeteryList" @click="checkdsx(item,index)">{{item.userName}}</div>
					</div>
					<!--按钮-->
					<div class="btn" @click="updataZj()" v-if="isCreator==1">编辑传记</div>
					<div class="set" @click="otherSet()" v-if="isCreator==1"></div>
				</div>
				<!--右侧二维码留言-->
				<div class="right">
					<!--标题-->
					<div class="title">
						<div :class="ewmTi" @click="ewmck()">二维码</div>
						<div :class="commentTi" @click="commentCk()">留言</div>
					</div>
					<!--分享-->
					<div class="shareSet">
						<div class="img">
							<img :src=" resultdata.sharePicPathCut ? imgurl+resultdata.sharePicPathCut: staticimg+'/images/boy-2.png'"/>
							<div class="hover" @click="otherSet()" v-if="isCreator==1">{{resultdata.accountType==1?'其他设置':'分享设置'}}</div>	
						</div>
						<!--标题-->
						<p class="p1">{{resultdata.shareTitle ? resultdata.shareTitle : '分享标题'}}</p>
						<!--内容-->
						<p class="p2">{{resultdata.shareContent ? resultdata.shareContent :'分享内容'}}</p>
					</div>
					<div v-show="ewmComment">					
						<!--快速分享-->
						<div class="shareMore">
							<p class="p1">
								<span></span>
								<span>手机扫一扫 分享给好友</span>
								<span></span>
							</p>
							<div class="ewmImg">
								<img :src="qrcodeImageUrl" />
							</div>
							<!--分享网址-->
							<div class="url">
								<span>分享网址</span>
								<div ref="urlinput"><Input type="text" :value="locationhref"  ></Input></div>
								<Button @click="copyurl(locationhref)" >复制网址</Button>
							</div>
							<div class="other">
								<span>快速分享</span>
								 <ul>
									<li @click="qqshareFun()"><img src="../../images/share_qzone.png" title="分享到QQ空间"/></li>
									<li @click="weiboshareFun()"><img src="../../images/share_sina_weibo.png" title="分享到新浪微博"/></li>
								</ul> 								
							</div>
						</div>
						<!--访客记录-->
						<div class="fkinfo">
							<p class="p1">最近访客<span>浏览量<i>{{resultdata.browseNum}}</i></span></p>
							<img src="../../images/release_noone.png" class="notData" v-if="resultdata.browseNum == 0"/>
							<ul v-else>
								<li v-for=" item in visitorMapList ">
									<img  :src="item.headerPicture? imgurl+item.headerPicture: staticimg+'/images/Visitorsmoren.png'" />
									<p>{{item.userName ?item.userName:"游客"}}</p>
									<p class="time">{{filter(item.visitorTime)}}</p>
								</li>
							</ul>
						</div>
						<!--留言-->
					</div>
					<div v-show="!ewmComment" class="comment">
						<!--留言内容-->
						<div class="data">
							<p class="title">共 <span>{{lylenght}}</span> 条留言</p>

							<div class="ly" v-for="item in lydata" v-show="lylenght != 0">
								<img  class="headimg" :src="item.headerPicture ? imgurl+item.headerPicture :staticimg+'/images/boy-2.png'"/>
								<div class="info">
									<p class="name"><span class="sp1">{{item.userName ? item.userName :"游客"}}</span><span class="sp2" @click="delly(item.id)"  v-if="isCreator==1">删除</span><span class="sp3" @click="replay(item.id,item.accountId,item.userName)">回复</span></p>
									<p class="time">{{filter2(item.createTime)}}</p>
									<p class="p">
										{{item.content}}
									</p>
									<P class="hfp" v-if="item.replyList != null" v-for="item1 in item.replyList">
										<span>{{item1.replyName?item1.replyName:'游客'}}</span> 回复 <span>{{item1.byReplyName?item1.byReplyName:'游客'}}</span>:{{item1.content}}
										<span class="del" @click="delreplay(item1.id)" v-if="isCreator==1" >删除</span>
									</P>
								</div>
							</div>
							<!-- 无数据样式 -->
							<div v-show="lylenght == 0" class="notData">
								<img src="../../images/blank_comment.png" />
							</div>
						</div>
						<!--输入框-->
						<div class="input">
							<div class="commentInput">
								<Input v-model="lycontent" @on-enter="sendly()" placeholder="留下留言" :maxlength="150"></Input>								
							</div><div class="sendBtn" @click="sendly()">发送</div>
						</div>
					</div>
				</div>
			</div>			
		</div>
		<!--组件-->
		<Modal v-model="qtset" :title="resultdata.accountType==1?'其他设置':'分享设置'" class="otherModal" width="800">
            <div>
                <div class="left">
                    <div class="img">
                        <img :src="qtslperson.sharePicPathCut ? imgurl+qtslperson.sharePicPathCut : staticimg+'/images/boy-2.png'">                        
                    </div>
                    <p @click="toggleShow" class="btn">更换封面</p>                    
                    <div class="txt">
                        <p>传记标题<span>（建议25字符内）</span></p>
                        <Input v-model="qtslperson.shareTitle" type="textarea"  placeholder="请输入..." class="textarea1"></Input>
                        <p class="p2">传记描述<span>（建议50字符内）</span></p>
                        <Input v-model="qtslperson.shareContent" type="textarea"  placeholder="请输入..." class="textarea2"></Input>
                    </div>
                </div>
                <div class="right" >
                    <!--上半部-->
                    <div class="top" v-if='usertype=="1"'>
                        <div class="age">
                            <span>年龄</span>
                            <ul>
                                <li v-for="item in qtsl.ageMapList"><input type="checkbox" :value="item.code" :checked="item.checked" @change="changeitem(item)"><label>{{item.value}}</label></li>
                            </ul>
                        </div>
                        <div>
                            <span>职业</span>
                            <ul>
                                <li v-for="item in qtsl.jobMapList"><input type="checkbox" :value="item.code" :checked="item.checked" @change="changeitem(item)" ><label>{{item.value}}</label></li>
                            </ul>
                        </div>
                        <div>
                            <span>风格</span>
                            <ul>
                            <li v-for="item in qtsl.styleMapList"><input type="checkbox" :value="item.code" :checked="item.checked" @change="changeitem(item)"><label>{{item.value}}</label></li>
                            </ul>
                        </div>
                        <div>
                            <span>颜色</span>
                            <ul>
                                <li v-for="item in qtsl.colorMapList"><input type="checkbox" :value="item.code" :checked="item.checked" @change="changeitem(item)"><label>{{item.value}}</label></li>
                            </ul>
                        </div>
                    </div>
                    <div class="top1" v-if='usertype !="1"'>
						<!--普通用户界面  -->
                        <div class="content1">
                            <p class="p1">{{qtslperson.shareTitle}}</p>
                            <img :src="qtslperson.sharePicPathCut ? imgurl + qtslperson.sharePicPathCut : staticimg+'/images/boy-2.png'" class="img"/>
                            <p class="p2">{{qtslperson.shareContent}}</p>
                        </div>
                    </div>
                    <!--下半部-->
                    <div class="bottom">
                        <span v-if='usertype=="1"'>权限：</span>
                        <Radio-group v-model="qtsl.cemetery.status" v-if='usertype=="1"'>
                            <Radio :label="0" >{{'自己可见'}}</Radio>
                            <Radio :label="2" >{{'公开'}}</Radio>
                        </Radio-group>
                        <span style="display:inline-block;width:220px;" v-if='usertype!="1"'></span>
                        <Button type="text" class="cancel" @click="qtcancel">取消</Button>
                        <Button type="warning" class="ok"  @click="qtmethod">确定</Button>
                    </div>
                </div>
            </div>
        </Modal>
		 <my-upload field="file"
            @crop-upload-success="cropUploadSuccess"
            :crop=false
            :value=oneWay
            v-model="qtshow"
            :width="140"
            :height="140"
            :url="global+'/common/template/upload'"
            :params="params"
            :headers="tokendata"
            img-format="png"></my-upload>
	</div>
</template>
<script>
    import { USER_SIGNIN } from 'store/user'
   	import global from '../../config/global'
	import myUpload from 'vue-image-crop-upload/upload-2.vue'
	import { mapState } from 'vuex'
	import { swiper, swiperSlide } from 'vue-awesome-swiper'
    export default {
		data(){
			return{
				imgurl:global.imgurl,
				staticimg:global.staticimg,
				videourl:global.videourl,
				videoImg:global.videoImg,
				musicurl:global.musicurl,
				qrcodeImageUrl:"",
				dscheckactive:0,
				ewmComment:true,//二维码留言板块切换
				ewmTi:"on",//二维码标题样式
				commentTi:"",//留言标题样式
				resultdata:{},//传记信息
				visitorMapList:[],//访客列表
				global:"",
				tokendata:"",
				locationhref:"",//浏览器网址
				lycontent:"",
				lydata:[],//留言数据
				lylenght:"",
				headerstyle:"",
				qrCode:"",
				usertype:"",
				qtset:false,//其他设置
				qtsl:"",
				qtslperson:"",
				qtslpersondata:"",
				picThumbnail:"",//其他设置图片-需要回传的参数
				swiperOption:{
                    slidesPerView:3,
                    slidesPerColumn: 1,
                    notNextTick: true
                },
                rsOption:{//人生旅轮播修改
					slidesPerView:2,				
					debugger: false,											
				},
                zpOption:{
                    slidesPerView:3,
                   slidesPerColumn: 3,
                   slidesPerColumnFill : 'row',
                   debugger: false,
                   onTransitionStart(swiper){
                   }
                },
                spOption:{
                   slidesPerView:1,
                   slidesPerColumn: 2,
                   slidesPerColumnFill : 'column',
                   debugger: false,
                   onTransitionStart(swiper){
                   }
                },
				qtshow:false,
				replayId:"",//回复ID
				replayName:"",//被回复的用户名
				replayAccountId:"",//被回复ID
				isCreator:"",
				customized:"",//是否是电子墓碑
				birthDayAnd:"",
				checkStatus:"",//审核状态
				Singlere:{
					moduleId:"",
					cemeteryId:"",
					eventContent:"",
					endTime:"",
					startTime:"",
					id:"",
					eventPicCutBig:"",
					startTimeAndEndTime:"",
					imageStyle:""
				},
				reltdata:[],
				popupFlg:true,
				phoneShow:true,
				iconcheckflag:0,
				doubleCemeteryList:[],

			}
		},
        computed: mapState({ user: state => state.user }),		
		created() {
			if(this.IsPC()){
				this.ajax();		
			}
			else{
				this.firstFn();
			}
		},
		components: {
			swiper, swiperSlide,
            'my-upload': myUpload,
        },
		watch:{
			"$route":"ajax",
		},
		mounted(){
			document.body.scrollTop = 0;
            document.documentElement.scrollTop = 0;
		},
		methods:{
			scrollBarWheel(value){
                this.popupFlg = false;                    
            },
			IsPC() {
				var userAgentInfo = navigator.userAgent;
				var Agents = ["Android", "iPhone",
							"SymbianOS", "Windows Phone",
							"iPad", "iPod"];
				var flag = true;
				for (var v = 0; v < Agents.length; v++) {
					if (userAgentInfo.indexOf(Agents[v]) > 0) {
						flag = false;
						break;
					}
				}
				return flag;
			},
			firstFn(){
				this.$http.get(global.host+"/cemeteryOwner/unsecured/mobile/getPreviewLink?cemeteryId="+this.$route.query.cemeteryId)
                    .then((response) => {
						window.location.href=response.body.previewLink
                    })
                    .catch(function (response) {
                })
			},
			filter(value) {//value为13位的时间戳
				function add0(m) {
					return m < 10 ? '0' + m : m
				}
				var time = new Date(parseInt(value));
				var y = time.getFullYear();
				var m = time.getMonth() + 1;
				var d = time.getDate();
				return  add0(m) + '-' + add0(d) + '';
			},
			filter2(value) {//value为13位的时间戳
				function add0(m) {
					return m < 10 ? '0' + m : m
				}
				var time = new Date(parseInt(value));
				var y = time.getFullYear();
				var m = time.getMonth() + 1;
				var d = time.getDate();
				return y + '-' + add0(m) + '-' + add0(d) + '';
			},
			ajax(){
				this.global=global.host
                this.tokendata={"Authorization":this.user.token_type+" "+this.user.access_token}
				 this.$http.get(global.host+"/cemeterySweep/unsecured/lifebook/query?cemeteryId="+this.$route.query.cemeteryId,{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
				.then((response) => {
					if(response.body.status == 1){
						this.isCreator = response.body.isCreator;
						this.checkStatus = response.body.auditStatus;
						if(response.body.auditStatus != 3 && this.isCreator == 0){
							this.$router.push({ path: '/unchecked',query:{"type":1}});//跳转传记页面
						}						
						if( response.body.deleted == 1 ){
							this.$router.push({ path: '/unchecked',query:{"type":2}});//跳转传记页面
						}
						this.resultdata = response.body.result;
						this.visitorMapList = response.body.result.visitorMapList;
						this.locationhref = window.location.href;
						var a = response.body.result.qrcode;
						this.resultdata.qrCode = a;
						this.getdata(a);
						
					}else if(response.body.status == 2 && response.body.deleted == 1){
						this.$router.push({ path: '/unchecked',query:{"type":2}});//跳转传记页面
					}else{
						this.$Message.error(response.body.message);
					}
					
				})
				.catch(function (response) {
				})   
			},			
			ewmck(){
				this.ewmComment = true;
				this.ewmTi = "on";
				this.commentTi = "";
			},
			rsltcheckFn(index){
                this.iconcheckflag=index;
                this.Singlere=this.reltdata[index]
            },
			commentCk(){
				this.ewmComment = false;
				this.ewmTi = "";
				this.commentTi = "on";
				this.$http.get(global.host+"/cemeterySweep/unsecured/query?cemeteryId="+this.$route.query.cemeteryId,{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
				.then((response) => {
					if(response.body.status == 1){
						this.lydata = response.body.result;
						this.lylenght = response.body.total;
						//this.isCreator = response.body.isCreator;
					}
				})
				.catch(function (response) {

				})   
			},
			updataZj(){//编辑传记按钮
				var butflag=true;
				 if(this.checkStatus == 3){
					 this.$Modal.confirm({
	                    width:"320",
						content:"<p>该人物传记已审核成功，继续编辑需要重新审核，是否继续编辑？</p>" ,
						onOk: () => {
							
							if(butflag){
								this.$router.push({ path: '/templateEdit',query:{"mid":this.$route.query.cemeteryId,"nid":this.$route.query.template}});//跳转传记页面					 	 
								butflag=false;
							}
						},
						onCancel: () => {
						}
					});
				 }else if(this.checkStatus == 2){
					 this.$Modal.confirm({
	                    width:"320",
						content:"<p>该人物传记正在审核中，继续编辑需要重新审核，是否继续编辑？</p>" ,
						onOk: () => {
							if(butflag){
								this.$router.push({ path: '/templateEdit',query:{"mid":this.$route.query.cemeteryId,"nid":this.$route.query.template}});//跳转传记页面					 	 
								butflag=false;
							}
						},
						onCancel: () => {
						}
					});
				 }
				 
			},
			copyurl(obj){
				this.$refs.urlinput.children[0].children[1].select();
				document.execCommand('Copy');
				this.$Message.success('复制成功！');
				
			},
			sendly(){				
				if(localStorage.getItem('user') == null){
					this.$Message.error('请先登录');
					return;
				}
				if(!this.lycontent){
					this.$Message.error("留言不能为空！");
				}else{
					if(this.replayId == ''){//判断回复ID是否为空
						//ID为空，发送正常留言
						this.$http.post(global.host+"/cemeterySweep/insert",{"cemeteryId":this.$route.query.cemeteryId,"content":this.lycontent},{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
						.then((response) => {
							if(response.body.status == 1){
								this.lycontent = "";
								this.$Message.success('发送成功!');
								this.commentCk();
							}else{
								this.$Message.error(response.body.message);
							}
						})
						.catch(function (response) {

						})  
					}else{
						//ID不为空，发送回复
						//判断内容前几个是否为@+用户名
						// console.log(this.replayName.length);
						// console.log(this.replayId);
						// console.log(this.lycontent.substr(0,1)=="@");
						// console.log(this.lycontent.substr(1,this.replayName.length))
						// if(this.replayName == ''){
						// 	this.replayName = '游客';
						// }
						if(this.lycontent.substr(0,1)=="@" && this.lycontent.substr(1,this.replayName.length)==this.replayName){
							//说明是回复
							this.lycontent = this.lycontent.slice(this.replayName.length+1);
							this.$http.post(global.host+"/cemeterySweep/unsecured/reply/insert",{"id":this.replayId,"accountId":this.replayAccountId,"content":this.lycontent},{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
							.then((response) => {
								if(response.body.status == 1){
									this.lycontent = "";
									this.$Message.success(response.body.message);
									this.commentCk();
								}else{
									this.$Message.error(response.body.message);
								}
							})
						}else{
							//到这一步说明点击了回复，但是把@或者用户名修改了，按照正常留言处理
							this.$http.post(global.host+"/cemeterySweep/insert",{"cemeteryId":this.$route.query.cemeteryId,"content":this.lycontent},{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
							.then((response) => {
								if(response.body.status == 1){
									this.lycontent = "";
									this.$Message.success('发送成功!');
									this.commentCk();
								}
								else{
									this.$Message.error(response.body.message);
								}
							})
							.catch(function (response) {

							})  

						}
						


					}
					
				}
				
			},
			delly(id){
				this.$Modal.confirm({
                    width:"320",
                    content:"<p>确定要删除留言么？</p>" ,
                    onOk: () => {
						this.$http.post(global.host+"/cemeterySweep/delete",{"id":id},{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
						.then((response) => {
							if(response.body.status == 1){
								this.$Message.success('删除成功!');
								this.commentCk();
							}
						})
						.catch(function (response) {

						})  
                    },
                    onCancel: () => {
                    }
                });

			},
			filterFn(obj){
				var obj=JSON.stringify(obj)
				var a=obj.replace(/\d+\.?\d*px/g,function(name){return (parseInt(name)*1.97/75).toFixed(2)+"rem"})
				var b=eval('('+a+')');
				return b;
            },
			//获取模板数据
			getdata(qrCode){
				this.phoneShow = false;
				var _this=this;
                this.global=global.host
				this.$http.get(global.host+"/cemeteryOwner/unsecured/template/dynamic/pc?hid="+_this.$route.query.cemeteryId+"&templateId="+_this.$route.query.template,{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
				.then((response) => {		
					if(response.body.status == 1){
						this.phoneShow = true;
						this.headerstyle=response.body.result.templateModuleDTO;
						this.qrcodeImageUrl=response.body.qrcodeImageUrl;
						this.customized = response.body.result.customized;
						this.doubleCemeteryList = response.body.result.doubleCemeteryList;						
						if((this.doubleCemeteryList.length > 1 ? this.doubleCemeteryList[1].cemeteryId : '') == this.$route.query.cemeteryId){
							this.dscheckactive = 1;
						}
						for(var i=0;i<_this.headerstyle.length;i++){
                            if(_this.headerstyle[i].type==4){
                                _this.reltdata=_this.headerstyle[i].lifes;
                                    if(_this.reltdata!=""){
                                        _this.Singlere=_this.reltdata[0];
                                    }
                                    else{
                                        _this.Singlere={
                                            moduleId:"",
                                            cemeteryId:"",
                                            eventContent:"",
                                            endTime:"",
                                            startTime:"",
                                            id:"",
                                            eventPicCutBig:"",
                                            startTimeAndEndTime:"",
                                            imageStyle:""
                                        }
                                }
                            }
                        }
					}else if(response.body.status == 0){
						this.$Message.error(response.body.message);
					}							
					
				})
				.catch(function (response) {
				})
			},
			otherSet(){//其他设置
				this.qtset = true;
				this.$http.get(global.host+"/cemetery/template/show/query/one?id="+this.$route.query.cemeteryId+"&templateId="+this.$route.query.template,{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
					.then((response) => {
						this.qtsl=response.body;
						this.qtslperson=response.body.cemetery;
						this.usertype=response.body.accountType;
					})
					.catch(function (response) {
				})
			},
			qtcancel(){
                this.qtset=false;
            },
            qtmethod(){

                var ageMapListid="";
                var jobMapListid="";
                var styleMapListid="";
				var colorMapListid="";
				var jobMapListidName="";
                var styleMapListidName="";
                var colorMapListidName="";
				if(this.qtsl.ageMapList){
					 for(var i=0;i<this.qtsl.ageMapList.length;i++){
						if(this.qtsl.ageMapList[i].checked==true){
							ageMapListid+=this.qtsl.ageMapList[i].code+","
						}
					}
					for(var i=0;i<this.qtsl.jobMapList.length;i++){
						if(this.qtsl.jobMapList[i].checked==true){
							jobMapListid+=this.qtsl.jobMapList[i].code+","
							jobMapListidName+=this.qtsl.jobMapList[i].value; 
						}
					}
					for(var i=0;i<this.qtsl.styleMapList.length;i++){
						if(this.qtsl.styleMapList[i].checked==true){
							styleMapListid+=this.qtsl.styleMapList[i].code+",";
							styleMapListidName+=this.qtsl.styleMapList[i].value; 
						}
					}
					for(var i=0;i<this.qtsl.colorMapList.length;i++){
						if(this.qtsl.colorMapList[i].checked==true){
							colorMapListid+=this.qtsl.colorMapList[i].code+",";
							colorMapListidName+=this.qtsl.colorMapList[i].value; 
						}
					}
				}else{
				}
                this.$http.post(global.host+"/common/template/update",{"status":(this.qtsl.cemetery.status==undefined?0:this.qtsl.cemetery.status),"cemeteryId":this.$route.query.cemeteryId,"id":this.$route.query.template,"picSource":this.qtslperson.sharePicPathCut,"picThumbnail":this.picThumbnail,"title":this.qtslperson.shareTitle,"description":this.qtslperson.shareContent,"colorType":colorMapListid,"ageType":ageMapListid,"jobType":jobMapListid,"type":styleMapListid,"jobTypeName":jobMapListidName,"typeName":styleMapListidName,"colorTypeName":colorMapListidName},{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
                    .then((response) => {
						if(response.body.status == 1){
							this.qtset=false;
							this.ajax();                    
						}else{
							this.$Message.error(response.body.message);
						}
                        
                    })
                    .catch(function (response) {
                })
            },
			toggleShow(){
                this.qtshow=true;
            },
			cropUploadSuccess(jsonData, field){
				this.picThumbnail = jsonData.picThumbnail;
				this.qtslperson.sharePicPathCut=jsonData.picSource;
                this.qtslpersondata=jsonData.picSource;
            },
			changeitem(item){
                item.checked=!item.checked
            },
			checkdsx(item,index){//单双穴切换
				this.dscheckactive=index;
				this.$router.push({ path: '/publish' ,query:{"template":item.templateId,"cemeteryId":item.cemeteryId}});//跳转传记页面
				if(this.ewmTi == "on"){
					
				}else{
					this.commentCk();
				}
			},
			replay(id,accountId,userName){
				this.replayId = id;
				this.replayName = userName == '' ? '游客' :userName;
				this.replayAccountId = accountId;
				this.lycontent = '@'+this.replayName;
			},
			delreplay(id){
				this.$Modal.confirm({
                    width:"320",
                    content:"<p>确定要删除这条回复么？</p>" ,
                    onOk: () => {
						this.$http.post(global.host+"/cemeterySweep/reply/delete",{"id":id},{headers:{"Authorization":this.user.token_type+" "+this.user.access_token}})
						.then((response) => {
							if(response.body.status == 1){
								this.$Message.success('删除成功!');
								this.commentCk();
							}
						})
						.catch(function (response) {
						})
                    },
                    onCancel: () => {
                    }
                });
			},
			qqshareFun(){
				let url = encodeURIComponent(this.locationhref);
				window.open("https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+url+"&title="+this.resultdata.shareTitle+"&desc="+this.resultdata.shareTitle+"&summary="+this.resultdata.shareContent+"&site="+this.resultdata.shareContent)	
			},
			weiboshareFun(){
				let url = encodeURIComponent(this.locationhref);
				window.open("http://service.weibo.com/share/share.php?url="+url+"&title="+this.resultdata.shareTitle+"&appkey=1343713053&searchPic=");				
			},
			loginBackFn(){
				return { path: '/publish',query:{"template":this.$route.query.template,"cemeteryId":this.$route.query.cemeteryId}};//跳转传记页面
			},
			birthdayTime(time){
                function add0(m) {
					return m < 10 ? '0' + m : m
				}
				var time = new Date(parseInt(time));
				var y = time.getFullYear();
				var m = time.getMonth() + 1;
				var d = time.getDate();
				if(this.customized == 1){//判断是否需要中文
					y = this.Arabia(y);				
					m = this.Arabia2(m);				
					d = this.Arabia2(d);	
					this.birthDayAnd = " 至 ";
				    return y + '年' + add0(m) + '月' + add0(d) + '日';                    
				}else{
					this.birthDayAnd = " - ";
				    return y + '-' + add0(m) + '-' + add0(d) + '';
                }
            },
            Arabia(Num){
				for (var i = Num.length - 1; i >= 0; i--) {
					Num = Num.replace(",", "")//替换Num中的“,”
					Num = Num.replace(" ", "")//替换Num中的空格
				}    
				//字符处理完毕后开始转换，采用前后两部分分别转换
				var part = String(Num).split(".");
				var newchar = "";
				//小数点前进行转化
				for (i = part[0].length - 1; i >= 0; i--) {
					var tmpnewchar = ""
					var perchar = part[0].charAt(i);
					switch (perchar) {
						case "0":  tmpnewchar = "零" + tmpnewchar;break;
						case "1": tmpnewchar = "一" + tmpnewchar; break;
						case "2": tmpnewchar = "二" + tmpnewchar; break;
						case "3": tmpnewchar = "三" + tmpnewchar; break;
						case "4": tmpnewchar = "四" + tmpnewchar; break;
						case "5": tmpnewchar = "五" + tmpnewchar; break;
						case "6": tmpnewchar = "六" + tmpnewchar; break;
						case "7": tmpnewchar = "七" + tmpnewchar; break;
						case "8": tmpnewchar = "八" + tmpnewchar; break;
						case "9": tmpnewchar = "九" + tmpnewchar; break;
					}
					newchar = tmpnewchar + newchar;
				}   
				return newchar;
			},
			Arabia2(Num){				
				for (var　i = Num.length - 1; i >= 0; i--) {
						Num = Num.replace(",", "")//替换Num中的“,”
						Num = Num.replace(" ", "")//替换Num中的空格
				}    
				//字符处理完毕后开始转换，采用前后两部分分别转换
				var part = String(Num).split(".");
				var newchar = "";
				//小数点前进行转化
				for (var i = part[0].length - 1; i >= 0; i--) {
					var tmpnewchar = ""
					var perchar = part[0].charAt(i);
					switch (perchar) {
						// case "0":  tmpnewchar = "零" + tmpnewchar;break;
						case "1": tmpnewchar = "一" + tmpnewchar; break;
						case "2": tmpnewchar = "二" + tmpnewchar; break;
						case "3": tmpnewchar = "三" + tmpnewchar; break;
						case "4": tmpnewchar = "四" + tmpnewchar; break;
						case "5": tmpnewchar = "五" + tmpnewchar; break;
						case "6": tmpnewchar = "六" + tmpnewchar; break;
						case "7": tmpnewchar = "七" + tmpnewchar; break;
						case "8": tmpnewchar = "八" + tmpnewchar; break;
						case "9": tmpnewchar = "九" + tmpnewchar; break;
					}
					switch (part[0].length - i - 1) {
						case 0: tmpnewchar = tmpnewchar; break;
						case 1: if (perchar != 0) tmpnewchar = tmpnewchar + "十"; break;
						case 2: if (perchar != 0) tmpnewchar = tmpnewchar + "百"; break;
						case 3: if (perchar != 0) tmpnewchar = tmpnewchar + "千"; break;
						case 4: tmpnewchar = tmpnewchar + "万"; break;
						case 5: if (perchar != 0) tmpnewchar = tmpnewchar + "十"; break;
						case 6: if (perchar != 0) tmpnewchar = tmpnewchar + "百"; break;
						case 7: if (perchar != 0) tmpnewchar = tmpnewchar + "千"; break;
						case 8: tmpnewchar = tmpnewchar + "亿"; break;
						case 9: tmpnewchar = tmpnewchar + "十"; break;
					}
					newchar = tmpnewchar + newchar;
				}   
				//替换所有无用汉字，直到没有此类无用的数字为止
				while (newchar.search("零零") != -1 || newchar.search("零亿") != -1 || newchar.search("亿万") != -1 || newchar.search("零万") != -1) {
					newchar = newchar.replace("零亿", "亿");
					newchar = newchar.replace("亿万", "亿");
					newchar = newchar.replace("零万", "万");
					newchar = newchar.replace("零零", "零");      
				}
				//替换以“一十”开头的，为“十”
				if (newchar.indexOf("一十") == 0) {
					newchar = newchar.substr(1);
				}
				//替换以“零”结尾的，为“”
				if (newchar.lastIndexOf("零") == newchar.length - 1) {
					newchar = newchar.substr(0, newchar.length - 1);
				}
				return newchar;
			}
		}
    }
</script>